package com.ybbase.framework.common.util;

import org.activiti.engine.impl.cfg.IdGenerator;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;

import java.util.UUID;

/**
 * uuid生成工具类
 *
 * @author cg
 * @date 2019-07-26 14:59
 * @since 4.0
 */
@Component
@Lazy(false)
public class IdGen implements IdGenerator {

    public static String uuid() {
        return UUID.randomUUID().toString().replaceAll("-", "");
    }

    @Override
    public String getNextId() {
        return uuid();
    }

}
